package com.lg.atp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

@ComponentScan
@SpringBootApplication
@ServletComponentScan
@EnableAutoConfiguration(exclude={MultipartAutoConfiguration.class})
public class Application {

	public static void main(String args[]){
		SpringApplication.run(Application.class, args);
	}
	
	@Bean
	public CommonsMultipartResolver getCommonsMultipartResolver() {
	    CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
	   // multipartResolver.setMaxUploadSize(20971520);   
	   // multipartResolver.setMaxInMemorySize(1048576);
	    return multipartResolver;
	}
}
